package com.csweimei.rentmanagementtreasure.weight.myBinding;

import android.widget.TextView;

import androidx.databinding.BindingAdapter;

import com.csweimei.rentmanagementtreasure.R;

public class TitleTextView {

    @BindingAdapter(value ={"color"},requireAll = false )
    public static void setTextViewColor(TextView textView,String color){
        if (color.equals("white")){
            textView.setTextColor(textView.getContext().getColor(R.color.white));
        }else {
            textView.setTextColor(textView.getContext().getColor(R.color.text_c));
        }
    }
}
